package com.desktopmng.orm;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@SuppressWarnings("serial")
@Entity
@Table(name = "JFOSS2_DESK_USER_CONFIG")
public class UserConfig extends BaseObject {

	
	public UserConfig(){};
	/**
	 * 唯一编号
	 */
	@Id
	@Column(name = "UC_ID")
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long ucId;

	/**
	 * 用户编号
	 */
	@Column(name = "USER_ID", nullable = false, unique = false)
	private Long userId;

	/**
	 * 主题编号
	 */
	@Column(name = "THEME_ID", nullable = false, unique = false)
	private Long themeId;

	/**
	 * 菜单风格编号
	 */

	@Column(name = "MS_ID", nullable = false, unique = false)
	private Long msId;

	/**
	 * 个人桌面布局
	 */

	@Column(name = "LAYOUT", length = 4000, nullable = true, unique = false)
	private String layout;

	/**
	 * 桌面模板
	 */

	@Column(name = "TEMPLATE", length = 4000, nullable = true, unique = false)
	private String template;

	/**
	 * 创建时间
	 */

	@Temporal(TemporalType.DATE)
	@Column(name = "CREATE_TIME")
	private Date createTime;

	/**
	 * 最后修改时间
	 */

	@Temporal(TemporalType.DATE)
	@Column(name = "LASTUPDATE_TIME")
	private Date lastupdateTime;
	
	/**
	 * 导航显示(默认显示	 1：显示	0：不显示 )
	 */
	@Column(name = "STATUS", length = 20, nullable = true, unique = false)
	private String status = "1";

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getLastupdateTime() {
		return lastupdateTime;
	}

	public void setLastupdateTime(Date lastupdateTime) {
		this.lastupdateTime = lastupdateTime;
	}

	public String getLayout() {
		return layout;
	}

	public void setLayout(String layout) {
		this.layout = layout;
	}

	public Long getMsId() {
		return msId;
	}

	public void setMsId(Long msId) {
		this.msId = msId;
	}

	public String getTemplate() {
		return template;
	}

	public void setTemplate(String template) {
		this.template = template;
	}

	public Long getThemeId() {
		return themeId;
	}

	public void setThemeId(Long themeId) {
		this.themeId = themeId;
	}

	public Long getId() {
		return ucId;
	}

	public void setId(Long ucId) {
		this.ucId = ucId;
	}

	public Long getUserId() {
		return userId;
	}

	public void setUserId(Long userId) {
		this.userId = userId;
	}

	public boolean equals(Object object) {
		if (this == object)
			return true;
		if (object == null)
			return false;
		if (UserConfig.class.isInstance(object)) {
			UserConfig peer = (UserConfig) object;
			if (this.getId().equals(peer.getId())) {
				return true;
			} else {
				return false;
			}
		} else {
			return false;
		}
	}

	public int hashCode() {
		StringBuffer sb = new StringBuffer();
		sb.append("UserConfig:").append(this.getId());
		return sb.toString().hashCode();
	}

}
